package com.dq.repository.user;

import com.dq.domain.sys.section.SysSection;
import com.dq.domain.sys.user.user.StaffUser;
import com.dq.domain.sys.user.user.base.SysUser;
import com.dq.domain.sys.user.user.WxUser;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author liuhui
 * @date 2019/9/16 0016 10:40:06
 */
@Repository
public interface WxUserRepository extends JpaRepository<WxUser, Long> {
    WxUser getByDeletedFalseAndMobile(String mobile);

    WxUser findByOpenidAndDeletedFalse(String openId);

    WxUser getByUsername(String username);
    WxUser getByOpenid(String openId);

    List<WxUser> findByIdNotIn(List<Long> longs);

    List<WxUser> findByUserRealcNameAndDeletedFalse(String name);

    List<WxUser> findByUserRealcNameLikeAndDeletedFalse(String name);

    List<WxUser> findByDeletedFalse();

    List<WxUser> findByDeletedAndSection(Boolean delete, SysSection org);

    List<WxUser> findByIdIn(List<Long> longs);

    List<WxUser> findByDeletedFalseAndStatus(SysUser.Status status);

}
